home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.programming,comp.lang.c++,comp.lang.c
- Path: watserv3.uwaterloo.ca!news
- From: bcrwhims@uwaterloo.ca (Carsten Whimster)
- Subject: Re: ? about writing a compiler
- Message-ID: <DoG4Lo.JxM@watserv3.uwaterloo.ca>
- Sender: news@watserv3.uwaterloo.ca
- Nntp-Posting-Host: cnts3p05.uwaterloo.ca
- Reply-To: carsten_whimster@iqpac.com (Carsten Whimster)
- Organization: EDM/2
- X-Newsreader: IBM NewsReader/2 v1.2.5
- References: <alt-x.26.016ECCB6@erinet.com>
- Date: Mon, 18 Mar 1996 04:32:12 GMT
-
- In <alt-x.26.016ECCB6@erinet.com>, alt-x@erinet.com (alternate-x) writes:
- >could someone please tell me of some pages that discuss the basics of
- >constructing a compiler? Any help is much appreciated. Thank you.
-
- :)
-
- You need to know about:
-
- - Regular expressions and FSMs, for the scanner
- - Context-free Grammars for the parser
- - Context-sensitive grammars, or something else for the code generator
-
- and you need to have a really good grasp of ASSEMBLER for this too. Plus
- you should know the rudiments of code optimization. That's just off the
- top of my head; I probably missed something.
-
- It takes at least two or three years for univeristy students to learn
- all the required tools for this (not that they study it full time
- however). I would recommend "Compilers - Principles, Techniques, and
- Tools", Aho, Sethi, Ullman or Fischer's "Crafting a Compiler" for
- reading. Fischer's book is probably easier, but quite good. Aho et al go
- in more depth, but move faster too.
-
- Finally, you are probably looking in the wrong newsgroup as someone else
- mentioned. You could probably write a toy compiler in 4 months if you
- were dedicated to it... :) A real compiler for a real language is a
- different story though.
-
- Carsten Whimster -- carsten_whimster@iqpac.com
- -- EDM/2 Associate Editor and Book reviewer
- EDM/2 http://www.iqpac.com/edm2/index.shtml
- Reviews http://www.iqpac.com/edm2/columns/books.shtml
- Webpage http://www.undergrad.math.uwaterloo.ca/~bcrwhims/index.html
-
-